package com.huahai.service.impl;

import com.huahai.entity.Product;
import com.huahai.mapper.ProductMapper;
import com.huahai.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductService implements IProductService {

    @Autowired
    ProductMapper mapper;

    /**
     * 根据产品id查询产品
     * @param pid
     * @return
     */
    public Product getProductById(int pid) {
        Product product = mapper.selectById(pid);

        return product;
    }
}
